<!DOCTYPE html>
<html lang="">

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <title>
        <%= htmlWebpackPlugin.options.title %>
    </title>
    <script src="https://zgtapp.zwfw.gxzf.gov.cn/zgt-h5/js/transferPlatformTool.min.js"></script>
    <script>
        window.croods = croods;
    </script>
    <script>
        sessionStorage.removeItem('appToken')
        window.onload = function () {
            if (croods.load) {
                croods.load(function () {
                    croods.customPlugin({
                        action: "UserPlugin.login",
                        params: {},
                        success: (res) => {
                            if (res.token) {
                                sessionStorage.setItem('appToken', res.token)
                            } else {
                                console.log("用户信息异常");
                            }
                        },
                        fail: (msg) => {
                            console.log("用户信息异常");
                        }
                    })
                })
            } else {
                croods.customPlugin({
                    action: "UserPlugin.login",
                    params: {},
                    success: (res) => {
                        if (res.token) {
                            sessionStorage.setItem('appToken', res.token)
                        } else {
                            console.log("用户信息异常");
                        }
                    },
                    fail: (msg) => {
                        console.log("用户信息异常");
                    }
                })
            }
        }
    </script>
    <meta http-equiv="pragma" content="no-cache" />
    <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="expires" content="0" />
</head>

<body>
    <noscript>
        <strong>
            We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't
                work properly without JavaScript enabled. Please enable it to
                continue.
        </strong>
    </noscript>
    <div id="app"></div>
</body>

</html>